package com.jiahua.user.biz.service.impl;

import java.util.List;

import com.jiahua.user.biz.dao.CustomerDao;
import com.jiahua.user.biz.model.Customer;
import com.jiahua.user.biz.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	CustomerDao customerDao;

	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}

	@Override
	public void addCustomer(Customer customer) {
		customerDao.saveCustomer(customer);
	}

	@Override
	public List<Customer> listCustomer(int topNum) {
		return customerDao.getListCustomer(topNum);
	}
	
	@Override
	public List<Customer> listAllCustomer() {
		return customerDao.getListAllCustomer();
	}

	@Override
	public Customer verifyLoginInfo(String loginId, String password) {

		return customerDao.verifyLoginInfo(loginId, password);
	}

	@Override
	public boolean deleteCustomer(String id) {
		return customerDao.deleteCustomer(id);

	}

}
